// https://iai.sh.cn/problem/106
#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  int empty = a, lid = a, ans = a;
  while (empty >= b || lid >= c) {
    int k = empty / b + lid / c; //能换多少瓶新汽水
    empty %= b;
    lid %= c;
    ans += k; // 喝
    empty += k;
    lid += k;
  }
  cout << ans;
  return 0;
}